feat(cli): add attach-only mode - #123
Merged
myobie merged 2 commits intoJul 30, 2026
Merged
Conversation
schickling
marked this pull request as ready for review
July 30, 2026 08:27
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22409acd12
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
schickling-assistant
marked this pull request as draft
July 30, 2026 08:41
schickling
marked this pull request as ready for review
July 30, 2026 08:52
schickling-assistant
marked this pull request as draft
July 30, 2026 08:55
myobie
marked this pull request as ready for review
July 30, 2026 12:14
myobie
pushed a commit
to compoundingtech/evals
that referenced
this pull request
Jul 30, 2026
Validated after compoundingtech/pty#123 landed as afeb3b6234b7010b7db802fd029766ad17c14219. The merged PTY tree is identical to authorized head 36547b02c32116cca81df4147a638da7df6981a5. Scoped attach-only cell passed 8/8; KDL, semantic, harness, overnight, catalog, and PII gates passed. No paid provider was launched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
pty attachcurrently prompts to restart retained dead-session metadata. ATTY-backed relay can remain at that prompt after its target dies, then consume
later input intended for the target as permission to execute the stored command.
Closes #122.
What
Add
pty attach --no-restart <ref>as an explicit attach-only policy:incarnation.
The existing interactive prompt and
--auto-restartbehavior remain unchanged.Focused help, generated completion metadata, README usage, and the changelog
document the new flag.
How
The CLI now models attach restart behavior as a three-state policy:
prompt | always | never. Theneverbranch refuses before entering thedead-session presentation/restart path, so it does not display or execute
retained launch metadata. Contradictory
--no-restart --auto-restartinput isrejected.
Rationale
This keeps the safety policy at the CLI boundary where the unsafe prompt exists,
while leaving the lower-level attach client and the existing interactive
contract intact.
Tests
npm run typechecknpm run buildnpx vitest run tests/attach-no-restart.test.ts tests/help.test.ts tests/completions.test.ts tests/nesting-prevention.test.ts(57 passed)nix build .#pty --no-linkin untouched shell/screenshot tests (zsh absent from the local Nix dev shell;
local Vim resolves to Neovim and Vim/nano terminal-query screenshots time out).
The new regression suite covers missing, exited, vanished, running-then-exited,
delayed-input/no-second-incarnation, default interactive compatibility, and
--auto-restartcompatibility.Companion eval coverage: compoundingtech/evals#42.
Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelruntime_profileskills_manifestworktreemachinetooling_profile